#define _CRT_SECURE_NO_WARNINGS	

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cassert>
using namespace std;

#define Max_Size 100

typedef struct Stack
{
    int* arr;
    int top;
}Stack;

void Init_Stack(Stack* ps)
{
    assert(ps);

    ps->arr = (int*)malloc(Max_Size * sizeof(int));
    ps->top = 0;
}

void Push(Stack* ps, int val)
{
    assert(ps);

    ps->arr[ps->top++] = val;
}

void Pop(Stack* ps)
{
    assert(ps);

    ps->top--;
}

int Top(Stack* ps)
{
    assert(ps);

    return ps->arr[ps->top-1];
}

int Empty(Stack* ps)
{
    assert(ps);

    return ps->top == 0;
}

void Destroy(Stack* ps)
{
    assert(ps);

    free(ps->arr);
    ps->arr = NULL;
    ps->top = 0;
}

int main()
{
    int n;
    cin >> n;

    if (n == 0)
    {
        cout << 0;
        exit(0);
    }

    Stack slist;
    Init_Stack(&slist);

    while (n)
    {
        Push(&slist, n % 2);
        n /= 2;
    }

    while (!Empty(&slist))
    {
        cout << Top(&slist);
        Pop(&slist);
    }

    Destroy(&slist);

    return 0;
}